/// CarouselChartCreateDto
class CarouselChartCreateDto {
  /// 图片访问地址（解密后）
  final String chartUrl;
  /// 图片跳转地址
  final String? redirectUrl;

  CarouselChartCreateDto({
    required this.chartUrl,
    this.redirectUrl,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['chartUrl'] = chartUrl;
    if (redirectUrl != null) data['redirectUrl'] = redirectUrl;
    return data;
  }

  factory CarouselChartCreateDto.fromJson(Map<String, dynamic> json) {
    return CarouselChartCreateDto(
      chartUrl: json['chartUrl'],
      redirectUrl: json['redirectUrl'],
    );
  }
}